Make invalid stylesheets fail to parse again
authorMatthias Clasen <mclasen@redhat.com>
Mon, 6 Dec 2010 05:44:58 +0000 (00:44 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 6 Dec 2010 05:47:13 +0000 (00:47 -0500)
commitf1fafca6ca94c864b791399d1989edd41caaa02c
treebe7f057953caadc30df35420e02cea63d0f37e25
parent94c9eb72ce4be9632f78c587bd19e8af474452f7
Make invalid stylesheets fail to parse again

The recent improvements to error reporting caused gtk_css_provider_load...
to always return TRUE and leave the error unset. Error messages were instead
dumped out with g_message, which is not helpful.

This commit changes things back to the way they were before:
If a GError is passed in, parsing will fail at the first error, reporting
it in the given GError. If no GError is passed in, we keep going and
just issue the warning messages. This fixes the parser tests.
gtk/gtkcssprovider.c